#import <Foundation/Foundation.h>
#import <BGFMDB.h>
NS_ASSUME_NONNULL_BEGIN
@interface CTDBManager : NSObject
+ (NSString *)getCurrentAccounDBName;
+ (BOOL)openOrCreateDB:(NSString *)name;
+ (BOOL)deleteDB:(NSString *)name;
+ (BOOL)closeDB:(NSString *)name;
#pragma mark - DB
+ (NSArray *)getDateArray;
+ (BOOL)addDateToArray:(NSString *)dateStr;
+ (NSArray *)getSearchRecordArray;
+ (BOOL)addSearchRecordToArray:(NSString *)string;
+ (BOOL)deleteSearchRecordWithIndex:(NSInteger)index;
+ (BOOL)saveObject:(id)object byFileName:(NSString*)fileName;
+ (id)getObjectByFileName:(NSString*)fileName;
+ (void)removeObjectByFileName:(NSString*)fileName;
+ (void)saveUserData:(id)data forKey:(NSString*)key;
+ (void)saveBool:(BOOL)value forKey:(NSString *)key;
+ (id)readUserDataForKey:(NSString*)key;
+ (BOOL)readBoolForKey:(NSString *)key;
+(void)removeUserDataForkey:(NSString*)key;
#pragma mark - path to document
+ (NSString *)documentAppendFilePath:(NSString *)fileName;
+ (BOOL)saveInDocumentWithObject:(id)object byFileName:(NSString *)fileName;
+ (id)getInDocumentWithObjectByFileName:(NSString*)fileName;
+ (BOOL)saveInDocumentWithObject:(id)object filePath:(NSString *)filePath fileName:(NSString *)fileName;
+ (id)getObjectInDocumentWithFilePath:(NSString*)filePath fileName:(NSString*)fileName;
+ (id)getObjectInDocumentWithFilePath:(NSString*)filePath;
+ (void)removeInDocumentWithObjectByFileName:(NSString *)fileName;
@end
NS_ASSUME_NONNULL_END
